import DBserve from "./nedb";

export const // 新增记录
  historyAdd = data =>
    DBserve({
      DBname: "history",
      order: "insert",
      option: data,
    }),
  // 查询记录列表
  historyList = data =>
    DBserve({
      DBname: "history",
      order: "find",
      option: data,
    }),
  // 查询记录
  historyGet = data =>
    DBserve({
      DBname: "history",
      order: "findOne",
      option: data,
    }),
  // 修改记录
  historyUpt = data =>
    DBserve({
      DBname: "history",
      order: "update",
      option: data,
    }),
  // 删除记录
  historyDel = data =>
    DBserve({
      DBname: "history",
      order: "remove",
      option: data,
    });
